It has long been the goal of the computer arts to create compelling visual images through computer graphics. While these visual images may represent real or imaginary things, they still require that certain aspects be presented with high realism. This requirement is especially true for optics. Humans rely on light to perceive the world around them. Variations in light due to various optical interactions are decoded by our brains into information about the nature, position shape and relationship between objects in the world. For this reason, any representation in computer graphics whether realistic or fantastic requires a certain amount of optical realism in order to be properly evaluated by the human brain.
Since we live in and perceive a three dimensional world, three dimensional computer graphics are usually more compelling. Three dimensional images may be simulated on a two dimensional screen by using various “tricks” known in the visual arts. In addition, “true” three dimensional images may also be displayed by providing two slightly different images to the viewer's eyes. Regardless of how the third dimension is realized, accurate and realistic optical effects are desirable for creating three-dimensional images.
It has also been the goal of the computer arts to create dynamic or real time computer generated graphics. That is, to create images that change in real time, preferably as a result of user input. Such graphics can be used in a variety of applications, such as, computer games, flight simulators, driving simulators, and the related training applications, virtual reality software, etc. Dynamic graphics usually require that a computer calculate the nature and positions of various objects and determine how to graphically represent these objects in real time. As a result, dynamic graphics require a considerable amount of processing power. In order to alleviate this need, preprocessing is often used.
Preprocessing refers to performing various processing actions for creating an image, at a time prior to the time when the image is to be created and when more processing resources are available. However, not all processing actions for creating an image may be performed at the preprocessing stage. In dynamic environments, some information about the placement of objects or the lighting may not be known until the time when the image is to be created. Therefore, the actions to be performed during preprocessing should be carefully selected as to use the limited information available at this stage in order to ease the processing requirements when the image is being drawn.
One known way of creating dynamic three dimensional graphics is the use of polygons. Three dimensional shapes are represented by one or more polygons. There are existing software packages that draw and manipulate predefined polygons. The performance of these packages is usually related to the number of polygons that are to be drawn. Shapes that have a high surface detail present a significant difficulty, as they may require a large number of polygons.
A known way to deal with this problem is to use a two dimensional picture that approximates the three dimensional qualities of the object. Thus, for example, a brick on a wall, may be represented by a two dimensional picture of a brick. While a brick does have three dimensional aspects, especially around the edges, these may not be kept track of by the computer. Instead, the two dimensional picture is drawn in such a way that it shows the three dimensional aspects. This method is especially useful when many identical elements are present. Such is the case, for example, when several hundred identical bricks are to be drawn on a wall.
However, a two dimensional picture does not always provide a good representation of the three dimensional brick. Three dimensional objects look different when viewed from different angles, and these differences cannot be represented by a single unchanging two dimensional picture. Furthermore, light reflects differently from a surface depending upon the surface's angle in relation to the angle of illumination. This information cannot be encoded in a fixed predefined two dimensional picture, because the angle of illumination is not usually known at the time the picture is created. This is especially true for light sources which are positioned dynamically, i.e., while a computer graphics application is running.
Environments that include a plurality of light sources are especially difficult to simulate in computer graphics. This difficulty is magnified if the simulation must be done in real-time. That is the case because the combined effect of multiple light sources on particular surface depends on many factors, including the location of the surface, the orientation of the surface, and the location and intensity of each light source. Furthermore, these relationships cannot be easily simplified. For example, it is difficult to combine the effects of the multiple light sources into a single representative light source, which can be used for all surfaces, because the combined effects of multiple light sources differ greatly depending on the spatial relationship between the surface and the light sources.